package com.bjpowernode.app;
import java.util.HashSet;
import java.util.Random;
public class MyApp4 {
    public static void main(String[] args) {
        HashSet<Integer> integers = new HashSet<>();
        Random random = new Random();
        while (true){
            int a = random.nextInt(10);
            integers.add(a);
            if(integers.size()==3){
               break;
            }
        }
        System.out.println(integers);
    }
}
